diff --git a/system/helpers/array_helper.php b/system/helpers/array_helper.php
index b728990..bd30b7c 100644
--- a/system/helpers/array_helper.php
+++ b/system/helpers/array_helper.php
@@ -38,7 +38,7 @@
  * @param	array
  * @param	mixed
  * @return	mixed	depends on what the array contains
- */	
+ */
 if ( ! function_exists('element'))
 {
 	function element($item, $array, $default = FALSE)
@@ -49,7 +49,7 @@
 		}
 
 		return $array[$item];
-	}	
+	}
 }
 
 // ------------------------------------------------------------------------
@@ -60,7 +60,7 @@
  * @access	public
  * @param	array
  * @return	mixed	depends on what the array contains
- */	
+ */
 if ( ! function_exists('random_element'))
 {
 	function random_element($array)
@@ -70,7 +70,7 @@
 			return $array;
 		}
 		return $array[array_rand($array)];
-	}	
+	}
 }
 
 
diff --git a/system/helpers/captcha_helper.php b/system/helpers/captcha_helper.php
index 67db509..3c80bb7 100644
--- a/system/helpers/captcha_helper.php
+++ b/system/helpers/captcha_helper.php
@@ -40,9 +40,9 @@
 if ( ! function_exists('create_captcha'))
 {
 	function create_captcha($data = '', $img_path = '', $img_url = '', $font_path = '')
-	{		
-		$defaults = array('word' => '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_path' => '', 'expiration' => 7200);		
-	
+	{
+		$defaults = array('word' => '', 'img_path' => '', 'img_url' => '', 'img_width' => '150', 'img_height' => '30', 'font_path' => '', 'expiration' => 7200);
+
 		foreach ($defaults as $key => $val)
 		{
 			if ( ! is_array($data))
@@ -53,11 +53,11 @@
 				}
 			}
 			else
-			{			
+			{
 				$$key = ( ! isset($data[$key])) ? $val : $data[$key];
 			}
 		}
-	
+
 		if ($img_path == '' OR $img_url == '')
 		{
 			return FALSE;
@@ -67,45 +67,45 @@
 		{
 			return FALSE;
 		}
-	
+
 		if ( ! is_writable($img_path))
 		{
 			return FALSE;
 		}
-			
+
 		if ( ! extension_loaded('gd'))
 		{
 			return FALSE;
-		}		
-	
+		}
+
 		// -----------------------------------
-		// Remove old images	
+		// Remove old images
 		// -----------------------------------
-			
+
 		list($usec, $sec) = explode(" ", microtime());
 		$now = ((float)$usec + (float)$sec);
-			
+
 		$current_dir = @opendir($img_path);
-	
+
 		while($filename = @readdir($current_dir))
 		{
 			if ($filename != "." and $filename != ".." and $filename != "index.html")
 			{
 				$name = str_replace(".jpg", "", $filename);
-		
+
 				if (($name + $expiration) < $now)
 				{
 					@unlink($img_path.$filename);
 				}
 			}
 		}
-	
+
 		@closedir($current_dir);
 
 		// -----------------------------------
 		// Do we have a "word" yet?
 		// -----------------------------------
-	
+
 	   if ($word == '')
 	   {
 			$pool = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -115,23 +115,23 @@
 			{
 				$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
 			}
-		
+
 			$word = $str;
 	   }
-	
+
 		// -----------------------------------
-		// Determine angle and position	
+		// Determine angle and position
 		// -----------------------------------
-	
+
 		$length	= strlen($word);
 		$angle	= ($length >= 6) ? rand(-($length-6), ($length-6)) : 0;
-		$x_axis	= rand(6, (360/$length)-16);			
+		$x_axis	= rand(6, (360/$length)-16);
 		$y_axis = ($angle >= 0 ) ? rand($img_height, $img_width) : rand(6, $img_height);
-	
+
 		// -----------------------------------
 		// Create image
 		// -----------------------------------
-	
+
 		// PHP.net recommends imagecreatetruecolor(), but it isn't always available
 		if (function_exists('imagecreatetruecolor'))
 		{
@@ -141,11 +141,11 @@
 		{
 			$im = imagecreate($img_width, $img_height);
 		}
-			
+
 		// -----------------------------------
 		//  Assign colors
 		// -----------------------------------
-	
+
 		$bg_color		= imagecolorallocate ($im, 255, 255, 255);
 		$border_color	= imagecolorallocate ($im, 153, 102, 102);
 		$text_color		= imagecolorallocate ($im, 204, 153, 153);
@@ -155,13 +155,13 @@
 		// -----------------------------------
 		//  Create the rectangle
 		// -----------------------------------
-	
+
 		ImageFilledRectangle($im, 0, 0, $img_width, $img_height, $bg_color);
-	
+
 		// -----------------------------------
 		//  Create the spiral pattern
 		// -----------------------------------
-	
+
 		$theta		= 1;
 		$thetac		= 7;
 		$radius		= 16;
@@ -185,9 +185,9 @@
 		// -----------------------------------
 		//  Write the text
 		// -----------------------------------
-	
+
 		$use_font = ($font_path != '' AND file_exists($font_path) AND function_exists('imagettftext')) ? TRUE : FALSE;
-		
+
 		if ($use_font == FALSE)
 		{
 			$font_size = 5;
@@ -210,32 +210,32 @@
 				$x += ($font_size*2);
 			}
 			else
-			{		
+			{
 				$y = rand($img_height/2, $img_height-3);
 				imagettftext($im, $font_size, $angle, $x, $y, $text_color, $font_path, substr($word, $i, 1));
 				$x += $font_size;
 			}
 		}
-	
+
 
 		// -----------------------------------
 		//  Create the border
 		// -----------------------------------
 
-		imagerectangle($im, 0, 0, $img_width-1, $img_height-1, $border_color);		
+		imagerectangle($im, 0, 0, $img_width-1, $img_height-1, $border_color);
 
 		// -----------------------------------
 		//  Generate the image
 		// -----------------------------------
-	
+
 		$img_name = $now.'.jpg';
 
 		ImageJPEG($im, $img_path.$img_name);
-	
+
 		$img = "<img src=\"$img_url$img_name\" width=\"$img_width\" height=\"$img_height\" style=\"border:0;\" alt=\" \" />";
-	
+
 		ImageDestroy($im);
-		
+
 		return array('word' => $word, 'time' => $now, 'image' => $img);
 	}
 }
diff --git a/system/helpers/compatibility_helper.php b/system/helpers/compatibility_helper.php
index 4d7d466..912eae6 100644
--- a/system/helpers/compatibility_helper.php
+++ b/system/helpers/compatibility_helper.php
@@ -20,13 +20,13 @@
  *
  * This helper contains some functions based on the PEAR PHP_Compat library
  * http://pear.php.net/package/PHP_Compat
- * 
+ *
  * The PEAR compat library is a little bloated and the code doesn't harmonize
  * well with CodeIgniter, so those functions have been refactored.
  * We cheat a little and use CI's _exception_handler() to output our own PHP errors
  * so that the behavior fully mimicks the PHP 5 counterparts.  -- Derek Jones
  * @PHP4
- * 
+ *
  * @package		CodeIgniter
  * @subpackage	Helpers
  * @category	Helpers
@@ -39,7 +39,7 @@
 if ( ! defined('PHP_EOL'))
 {
 	define('PHP_EOL', (DIRECTORY_SEPARATOR == '/') ? "\n" : "\r\n");
-} 
+}
 
 // ------------------------------------------------------------------------
 
@@ -83,16 +83,16 @@
 			}
 
 			$text = '';
-			
+
 			while ( ! feof($data))
 			{
 				$text .= fread($data, 4096);
 			}
-			
+
 			$data = $text;
 			unset($text);
 		}
-	
+
 		// strings only please!
 		if (is_array($data))
 		{
@@ -108,7 +108,7 @@
 		{
 			$mode = FOPEN_WRITE_CREATE_DESTRUCTIVE;
 		}
-	
+
 		// Check if we're using the include path
 		if (($flags & 1) > 0) // 1 = FILE_USE_INCLUDE_PATH flag
 		{
@@ -118,16 +118,16 @@
 		{
 			$use_include_path = FALSE;
 		}
-	
+
 		$fp = @fopen($filename, $mode, $use_include_path);
-	
+
 		if ($fp === FALSE)
 		{
 			$backtrace = debug_backtrace();
 			_exception_handler(E_USER_WARNING, 'file_put_contents('.htmlentities($filename).') failed to open stream', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		if (($flags & LOCK_EX) > 0)
 		{
 			if ( ! flock($fp, LOCK_EX))
@@ -137,17 +137,17 @@
 				return FALSE;
 			}
 		}
-		
+
 		// write it
 		if (($written = @fwrite($fp, $data)) === FALSE)
 		{
 			$backtrace = debug_backtrace();
 			_exception_handler(E_USER_WARNING, 'file_put_contents('.htmlentities($filename).') failed to write to '.htmlentities($filename), $backtrace[0]['file'], $backtrace[0]['line']);
 		}
-	
+
 		// Close the handle
 		@fclose($fp);
-	
+
 		// Return length
 		return $written;
 	}
@@ -179,7 +179,7 @@
 			_exception_handler(E_USER_WARNING, 'fputcsv() expects parameter 1 to be stream resource, '.gettype($handle).' given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		// OK, it is a resource, but is it a stream?
 		if (get_resource_type($handle) !== 'stream')
 		{
@@ -187,7 +187,7 @@
 			_exception_handler(E_USER_WARNING, 'fputcsv() expects parameter 1 to be stream resource, '.get_resource_type($handle).' given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		// Checking for an array of fields
 		if ( ! is_array($fields))
 		{
@@ -195,7 +195,7 @@
 			_exception_handler(E_USER_WARNING, 'fputcsv() expects parameter 2 to be array, '.gettype($fields).' given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		// validate delimiter
 		if (strlen($delimiter) > 1)
 		{
@@ -203,7 +203,7 @@
 			$backtrace = debug_backtrace();
 			_exception_handler(E_NOTICE, 'fputcsv() delimiter must be one character long, "'.htmlentities($delimiter).'" used', $backtrace[0]['file'], $backtrace[0]['line']);
 		}
-	
+
 		// validate enclosure
 		if (strlen($enclosure) > 1)
 		{
@@ -212,9 +212,9 @@
 			_exception_handler(E_NOTICE, 'fputcsv() enclosure must be one character long, "'.htmlentities($enclosure).'" used', $backtrace[0]['file'], $backtrace[0]['line']);
 
 		}
-	
+
 		$out = '';
-	
+
 		foreach ($fields as $cell)
 		{
 			$cell = str_replace($enclosure, $enclosure.$enclosure, $cell);
@@ -228,9 +228,9 @@
 				$out .= $cell.$delimiter;
 			}
 		}
-	
+
 		$length = @fwrite($handle, substr($out, 0, -1)."\n");
-	
+
 		return $length;
 	}
 }
@@ -258,33 +258,33 @@
 		{
 			settype($haystack, 'STRING');
 		}
-	
+
 		if ( ! is_string($haystack))
 		{
 			$backtrace = debug_backtrace();
 			_exception_handler(E_USER_WARNING, 'stripos() expects parameter 1 to be string, '.gettype($haystack).' given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		if ( ! is_scalar($needle))
 		{
 			$backtrace = debug_backtrace();
 			_exception_handler(E_USER_WARNING, 'stripos() needle is not a string or an integer in '.$backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		if (is_float($offset))
 		{
 			$offset = (int)$offset;
 		}
-	
+
 		if ( ! is_int($offset) && ! is_bool($offset) && ! is_null($offset))
 		{
 			$backtrace = debug_backtrace();
 			_exception_handler(E_USER_WARNING, 'stripos() expects parameter 3 to be long, '.gettype($offset).' given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return NULL;
 		}
-	
+
 		return strpos(strtolower($haystack), strtolower($needle), $offset);
 	}
 }
@@ -314,7 +314,7 @@
 		{
 			return $subject;
 		}
-	
+
 		// Crazy arguments
 		if (is_scalar($search) && is_array($replace))
 		{
@@ -329,7 +329,7 @@
 				_exception_handler(E_USER_NOTICE, 'Array to string conversion in '.$backtrace[0]['file'], $backtrace[0]['line']);
 			}
 		}
-	
+
 		// Searching for an array
 		if (is_array($search))
 		{
@@ -360,28 +360,28 @@
 			$search  = array((string)$search);
 			$replace = array((string)$replace);
 		}
-		
+
 		// Prepare the search array
 		foreach ($search as $search_key => $search_value)
 		{
 			$search[$search_key] = '/'.preg_quote($search_value, '/').'/i';
 		}
-		
+
 		// Prepare the replace array (escape backreferences)
 		foreach ($replace as $k => $v)
 		{
 			$replace[$k] = str_replace(array(chr(92), '$'), array(chr(92).chr(92), '\$'), $v);
 		}
-	
+
 		// do the replacement
 		$result = preg_replace($search, $replace, (array)$subject);
-	
+
 		// Check if subject was initially a string and return it as a string
 		if ( ! is_array($subject))
 		{
 			return current($result);
 		}
-	
+
 		// Otherwise, just return the array
 		return $result;
 	}
@@ -412,19 +412,19 @@
 			_exception_handler(E_USER_WARNING, 'http_build_query() Parameter 1 expected to be Array or Object. Incorrect value given', $backtrace[0]['file'], $backtrace[0]['line']);
 			return FALSE;
 		}
-	
+
 		// Cast it as array
 		if (is_object($formdata))
 		{
 			$formdata = get_object_vars($formdata);
 		}
-	
+
 		// If the array is empty, return NULL
 		if (empty($formdata))
 		{
 			return NULL;
 		}
-	
+
 		// Argument separator
 		if ($separator === NULL)
 		{
@@ -435,7 +435,7 @@
 				$separator = '&';
 			}
 		}
-	
+
 		// Start building the query
 		$tmp = array();
 
@@ -445,36 +445,36 @@
 			{
 				continue;
 			}
-	
+
 			if (is_integer($key) && $numeric_prefix != NULL)
 			{
 				$key = $numeric_prefix.$key;
 			}
-	
+
 			if (is_resource($val))
 			{
 				return NULL;
 			}
-			
+
 			// hand it off to a recursive parser
 			$tmp[] = _http_build_query_helper($key, $val, $separator);
 		}
-	
+
 		return implode($separator, $tmp);
 	}
-	
-	
+
+
 	// Helper helper.  Remind anyone of college?
 	// Required to handle recursion in nested arrays.
-	// 
+	//
 	// You could shave fractions of fractions of a second by moving where
 	// the urlencoding takes place, but it's much less intuitive, and if
 	// your application has 10,000 form fields, well, you have other problems ;)
 	function _http_build_query_helper($key, $val, $separator = '&')
-	{	
+	{
 		if (is_scalar($val))
 		{
-			return urlencode($key).'='.urlencode($val);			
+			return urlencode($key).'='.urlencode($val);
 		}
 		else
 		{
@@ -483,13 +483,13 @@
 			{
 				$val = get_object_vars($val);
 			}
-			
+
 			foreach ($val as $k => $v)
 			{
 				$tmp[] = _http_build_query_helper($key.'['.$k.']', $v, $separator);
 			}
 		}
-			
+
 		return implode($separator, $tmp);
 	}
 }
diff --git a/system/helpers/cookie_helper.php b/system/helpers/cookie_helper.php
index 4be371e..2821fad 100644
--- a/system/helpers/cookie_helper.php
+++ b/system/helpers/cookie_helper.php
@@ -51,7 +51,7 @@
 		$CI->input->set_cookie($name, $value, $expire, $domain, $path, $prefix);
 	}
 }
-	
+
 // --------------------------------------------------------------------
 
 /**
@@ -67,14 +67,14 @@
 	function get_cookie($index = '', $xss_clean = FALSE)
 	{
 		$CI =& get_instance();
-		
+
 		$prefix = '';
-		
+
 		if ( ! isset($_COOKIE[$index]) && config_item('cookie_prefix') != '')
 		{
 			$prefix = config_item('cookie_prefix');
 		}
-		
+
 		return $CI->input->cookie($prefix.$index, $xss_clean);
 	}
 }
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 2c60f03..e762be0 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -34,24 +34,24 @@
  *
  * @access	public
  * @return	integer
- */	
+ */
 if ( ! function_exists('now'))
 {
 	function now()
 	{
 		$CI =& get_instance();
-	
+
 		if (strtolower($CI->config->item('time_reference')) == 'gmt')
 		{
 			$now = time();
 			$system_time = mktime(gmdate("H", $now), gmdate("i", $now), gmdate("s", $now), gmdate("m", $now), gmdate("d", $now), gmdate("Y", $now));
-	
+
 			if (strlen($system_time) < 10)
 			{
 				$system_time = time();
 				log_message('error', 'The Date class could not set a proper GMT timestamp so the local time() value was used.');
 			}
-	
+
 			return $system_time;
 		}
 		else
@@ -60,7 +60,7 @@
 		}
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -79,22 +79,22 @@
  * @param	string
  * @param	integer
  * @return	integer
- */	
+ */
 if ( ! function_exists('mdate'))
 {
 	function mdate($datestr = '', $time = '')
 	{
 		if ($datestr == '')
 			return '';
-	
+
 		if ($time == '')
 			$time = now();
-		
+
 		$datestr = str_replace('%\\', '', preg_replace("/([a-z]+?){1}/i", "\\\\\\1", $datestr));
 		return date($datestr, $time);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -106,7 +106,7 @@
  * @param	string	the chosen format
  * @param	integer	Unix timestamp
  * @return	string
- */	
+ */
 if ( ! function_exists('standard_date'))
 {
 	function standard_date($fmt = 'DATE_RFC822', $time = '')
@@ -127,11 +127,11 @@
 		{
 			return FALSE;
 		}
-	
+
 		return mdate($formats[$fmt], $time);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -144,7 +144,7 @@
  * @param	integer	a number of seconds
  * @param	integer	Unix timestamp
  * @return	integer
- */	
+ */
 if ( ! function_exists('timespan'))
 {
 	function timespan($seconds = 1, $time = '')
@@ -156,12 +156,12 @@
 		{
 			$seconds = 1;
 		}
-	
+
 		if ( ! is_numeric($time))
 		{
 			$time = time();
 		}
-	
+
 		if ($time <= $seconds)
 		{
 			$seconds = 1;
@@ -170,85 +170,85 @@
 		{
 			$seconds = $time - $seconds;
 		}
-		
+
 		$str = '';
 		$years = floor($seconds / 31536000);
-	
+
 		if ($years > 0)
-		{	
+		{
 			$str .= $years.' '.$CI->lang->line((($years	> 1) ? 'date_years' : 'date_year')).', ';
-		}	
-	
+		}
+
 		$seconds -= $years * 31536000;
 		$months = floor($seconds / 2628000);
-	
+
 		if ($years > 0 OR $months > 0)
 		{
 			if ($months > 0)
-			{	
+			{
 				$str .= $months.' '.$CI->lang->line((($months	> 1) ? 'date_months' : 'date_month')).', ';
-			}	
-	
+			}
+
 			$seconds -= $months * 2628000;
 		}
 
 		$weeks = floor($seconds / 604800);
-	
+
 		if ($years > 0 OR $months > 0 OR $weeks > 0)
 		{
 			if ($weeks > 0)
-			{	
+			{
 				$str .= $weeks.' '.$CI->lang->line((($weeks	> 1) ? 'date_weeks' : 'date_week')).', ';
 			}
-		
+
 			$seconds -= $weeks * 604800;
-		}			
+		}
 
 		$days = floor($seconds / 86400);
-	
+
 		if ($months > 0 OR $weeks > 0 OR $days > 0)
 		{
 			if ($days > 0)
-			{	
+			{
 				$str .= $days.' '.$CI->lang->line((($days	> 1) ? 'date_days' : 'date_day')).', ';
 			}
-	
+
 			$seconds -= $days * 86400;
 		}
-	
+
 		$hours = floor($seconds / 3600);
-	
+
 		if ($days > 0 OR $hours > 0)
 		{
 			if ($hours > 0)
 			{
 				$str .= $hours.' '.$CI->lang->line((($hours	> 1) ? 'date_hours' : 'date_hour')).', ';
 			}
-		
+
 			$seconds -= $hours * 3600;
 		}
-	
+
 		$minutes = floor($seconds / 60);
-	
+
 		if ($days > 0 OR $hours > 0 OR $minutes > 0)
 		{
 			if ($minutes > 0)
-			{	
+			{
 				$str .= $minutes.' '.$CI->lang->line((($minutes	> 1) ? 'date_minutes' : 'date_minute')).', ';
 			}
-		
+
 			$seconds -= $minutes * 60;
 		}
-	
+
 		if ($str == '')
 		{
 			$str .= $seconds.' '.$CI->lang->line((($seconds	> 1) ? 'date_seconds' : 'date_second')).', ';
 		}
-			
+
 		return substr(trim($str), 0, -1);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -261,7 +261,7 @@
  * @param	integer a numeric month
  * @param	integer	a numeric year
  * @return	integer
- */	
+ */
 if ( ! function_exists('days_in_month'))
 {
 	function days_in_month($month = 0, $year = '')
@@ -270,12 +270,12 @@
 		{
 			return 0;
 		}
-	
+
 		if ( ! is_numeric($year) OR strlen($year) != 4)
 		{
 			$year = date('Y');
 		}
-	
+
 		if ($month == 2)
 		{
 			if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
@@ -297,18 +297,18 @@
  * @access	public
  * @param	integer Unix timestamp
  * @return	integer
- */	
+ */
 if ( ! function_exists('local_to_gmt'))
 {
 	function local_to_gmt($time = '')
 	{
 		if ($time == '')
 			$time = time();
-	
+
 		return mktime( gmdate("H", $time), gmdate("i", $time), gmdate("s", $time), gmdate("m", $time), gmdate("d", $time), gmdate("Y", $time));
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -323,23 +323,23 @@
  * @param	string	timezone
  * @param	bool	whether DST is active
  * @return	integer
- */	
+ */
 if ( ! function_exists('gmt_to_local'))
 {
 	function gmt_to_local($time = '', $timezone = 'UTC', $dst = FALSE)
-	{			
+	{
 		if ($time == '')
 		{
 			return now();
 		}
-	
+
 		$time += timezones($timezone) * 3600;
 
 		if ($dst == TRUE)
 		{
 			$time += 3600;
 		}
-	
+
 		return $time;
 	}
 }
@@ -352,7 +352,7 @@
  * @access	public
  * @param	integer Unix timestamp
  * @return	integer
- */	
+ */
 if ( ! function_exists('mysql_to_unix'))
 {
 	function mysql_to_unix($time = '')
@@ -360,11 +360,11 @@
 		// We'll remove certain characters for backward compatibility
 		// since the formatting changed with MySQL 4.1
 		// YYYY-MM-DD HH:MM:SS
-	
+
 		$time = str_replace('-', '', $time);
 		$time = str_replace(':', '', $time);
 		$time = str_replace(' ', '', $time);
-	
+
 		// YYYYMMDDHHMMSS
 		return  mktime(
 						substr($time, 8, 2),
@@ -376,7 +376,7 @@
 						);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -389,13 +389,13 @@
  * @param	bool	whether to show seconds
  * @param	string	format: us or euro
  * @return	string
- */	
+ */
 if ( ! function_exists('unix_to_human'))
 {
 	function unix_to_human($time = '', $seconds = FALSE, $fmt = 'us')
 	{
 		$r  = date('Y', $time).'-'.date('m', $time).'-'.date('d', $time).' ';
-		
+
 		if ($fmt == 'us')
 		{
 			$r .= date('h', $time).':'.date('i', $time);
@@ -404,21 +404,21 @@
 		{
 			$r .= date('H', $time).':'.date('i', $time);
 		}
-	
+
 		if ($seconds)
 		{
 			$r .= ':'.date('s', $time);
 		}
-	
+
 		if ($fmt == 'us')
 		{
 			$r .= ' '.date('A', $time);
 		}
-		
+
 		return $r;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -429,7 +429,7 @@
  * @access	public
  * @param	string	format: us or euro
  * @return	integer
- */	
+ */
 if ( ! function_exists('human_to_unix'))
 {
 	function human_to_unix($datestr = '')
@@ -438,25 +438,25 @@
 		{
 			return FALSE;
 		}
-	
+
 		$datestr = trim($datestr);
 		$datestr = preg_replace("/\040+/", ' ', $datestr);
-	
+
 		if ( ! preg_match('/^[0-9]{2,4}\-[0-9]{1,2}\-[0-9]{1,2}\s[0-9]{1,2}:[0-9]{1,2}(?::[0-9]{1,2})?(?:\s[AP]M)?$/i', $datestr))
 		{
 			return FALSE;
 		}
-	
+
 		$split = explode(' ', $datestr);
 
 		$ex = explode("-", $split['0']);
-	
+
 		$year  = (strlen($ex['0']) == 2) ? '20'.$ex['0'] : $ex['0'];
 		$month = (strlen($ex['1']) == 1) ? '0'.$ex['1']  : $ex['1'];
 		$day   = (strlen($ex['2']) == 1) ? '0'.$ex['2']  : $ex['2'];
 
 		$ex = explode(":", $split['1']);
-	
+
 		$hour = (strlen($ex['0']) == 1) ? '0'.$ex['0'] : $ex['0'];
 		$min  = (strlen($ex['1']) == 1) ? '0'.$ex['1'] : $ex['1'];
 
@@ -469,25 +469,25 @@
 			// Unless specified, seconds get set to zero.
 			$sec = '00';
 		}
-	
+
 		if (isset($split['2']))
 		{
 			$ampm = strtolower($split['2']);
-		
+
 			if (substr($ampm, 0, 1) == 'p' AND $hour < 12)
 				$hour = $hour + 12;
-			
+
 			if (substr($ampm, 0, 1) == 'a' AND $hour == 12)
 				$hour =  '00';
-			
+
 			if (strlen($hour) == 1)
 				$hour = '0'.$hour;
 		}
-			
+
 		return mktime($hour, $min, $sec, $month, $day, $year);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -500,26 +500,26 @@
  * @param	string	classname
  * @param	string	menu name
  * @return	string
- */	
+ */
 if ( ! function_exists('timezone_menu'))
 {
 	function timezone_menu($default = 'UTC', $class = "", $name = 'timezones')
 	{
 		$CI =& get_instance();
 		$CI->lang->load('date');
-	
+
 		if ($default == 'GMT')
 			$default = 'UTC';
 
 		$menu = '<select name="'.$name.'"';
-	
+
 		if ($class != '')
 		{
 			$menu .= ' class="'.$class.'"';
 		}
-	
+
 		$menu .= ">\n";
-	
+
 		foreach (timezones() as $key => $val)
 		{
 			$selected = ($default == $key) ? " selected='selected'" : '';
@@ -531,7 +531,7 @@
 		return $menu;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -543,15 +543,15 @@
  * @access	public
  * @param	string	timezone
  * @return	string
- */	
+ */
 if ( ! function_exists('timezones'))
 {
 	function timezones($tz = '')
 	{
 		// Note: Don't change the order of these even though
 		// some items appear to be in the wrong order
-		
-		$zones = array( 
+
+		$zones = array(
 						'UM12'		=> -12,
 						'UM11'		=> -11,
 						'UM10'		=> -10,
@@ -593,15 +593,15 @@
 						'UP13'		=> +13,
 						'UP14'		=> +14
 					);
-				
+
 		if ($tz == '')
 		{
 			return $zones;
 		}
-	
+
 		if ($tz == 'GMT')
 			$tz = 'UTC';
-	
+
 		return ( ! isset($zones[$tz])) ? 0 : $zones[$tz];
 	}
 }
diff --git a/system/helpers/directory_helper.php b/system/helpers/directory_helper.php
index 7de6a3c..574a5d8 100644
--- a/system/helpers/directory_helper.php
+++ b/system/helpers/directory_helper.php
@@ -38,7 +38,7 @@
  * @param	string	path to source
  * @param	int		depth of directories to traverse (0 = fully recursive, 1 = current dir, etc)
  * @return	array
- */	
+ */
 if ( ! function_exists('directory_map'))
 {
 	function directory_map($source_dir, $directory_depth = 0, $hidden = FALSE)
@@ -47,8 +47,8 @@
 		{
 			$filedata	= array();
 			$new_depth	= $directory_depth - 1;
-			$source_dir	= rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;		
-						
+			$source_dir	= rtrim($source_dir, DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
+
 			while (FALSE !== ($file = readdir($fp)))
 			{
 				// Remove '.', '..', and hidden files [optional]
@@ -66,7 +66,7 @@
 					$filedata[] = $file;
 				}
 			}
-			
+
 			closedir($fp);
 			return $filedata;
 		}
diff --git a/system/helpers/download_helper.php b/system/helpers/download_helper.php
index eac024f..4a17e51 100644
--- a/system/helpers/download_helper.php
+++ b/system/helpers/download_helper.php
@@ -36,7 +36,7 @@
  * @param	string	filename
  * @param	mixed	the data to be downloaded
  * @return	void
- */	
+ */
 if ( ! function_exists('force_download'))
 {
 	function force_download($filename = '', $data = '')
@@ -52,14 +52,14 @@
 		{
 			return FALSE;
 		}
-	
+
 		// Grab the file extension
 		$x = explode('.', $filename);
 		$extension = end($x);
 
 		// Load the mime types
 		@include(APPPATH.'config/mimes'.EXT);
-	
+
 		// Set a default mime if we can't find it
 		if ( ! isset($mimes[$extension]))
 		{
@@ -69,7 +69,7 @@
 		{
 			$mime = (is_array($mimes[$extension])) ? $mimes[$extension][0] : $mimes[$extension];
 		}
-	
+
 		// Generate the server headers
 		if (strpos($_SERVER['HTTP_USER_AGENT'], "MSIE") !== FALSE)
 		{
@@ -90,7 +90,7 @@
 			header('Pragma: no-cache');
 			header("Content-Length: ".strlen($data));
 		}
-	
+
 		exit($data);
 	}
 }
diff --git a/system/helpers/email_helper.php b/system/helpers/email_helper.php
index 046562a..7c8a610 100644
--- a/system/helpers/email_helper.php
+++ b/system/helpers/email_helper.php
@@ -32,7 +32,7 @@
  *
  * @access	public
  * @return	bool
- */	
+ */
 if ( ! function_exists('valid_email'))
 {
 	function valid_email($address)
@@ -48,7 +48,7 @@
  *
  * @access	public
  * @return	bool
- */	
+ */
 if ( ! function_exists('send_email'))
 {
 	function send_email($recipient, $subject = 'Test email', $message = 'Hello World')
diff --git a/system/helpers/file_helper.php b/system/helpers/file_helper.php
index 448bf27..c1ac167 100644
--- a/system/helpers/file_helper.php
+++ b/system/helpers/file_helper.php
@@ -35,7 +35,7 @@
  * @access	public
  * @param	string	path to file
  * @return	string
- */	
+ */
 if ( ! function_exists('read_file'))
 {
 	function read_file($file)
@@ -44,19 +44,19 @@
 		{
 			return FALSE;
 		}
-	
+
 		if (function_exists('file_get_contents'))
 		{
-			return file_get_contents($file);		
+			return file_get_contents($file);
 		}
 
 		if ( ! $fp = @fopen($file, FOPEN_READ))
 		{
 			return FALSE;
 		}
-		
+
 		flock($fp, LOCK_SH);
-	
+
 		$data = '';
 		if (filesize($file) > 0)
 		{
@@ -69,7 +69,7 @@
 		return $data;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -82,7 +82,7 @@
  * @param	string	path to file
  * @param	string	file data
  * @return	bool
- */	
+ */
 if ( ! function_exists('write_file'))
 {
 	function write_file($path, $data, $mode = FOPEN_WRITE_CREATE_DESTRUCTIVE)
@@ -91,16 +91,16 @@
 		{
 			return FALSE;
 		}
-		
+
 		flock($fp, LOCK_EX);
 		fwrite($fp, $data);
 		flock($fp, LOCK_UN);
-		fclose($fp);	
+		fclose($fp);
 
 		return TRUE;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -115,19 +115,19 @@
  * @param	string	path to file
  * @param	bool	whether to delete any directories found in the path
  * @return	bool
- */	
+ */
 if ( ! function_exists('delete_files'))
 {
 	function delete_files($path, $del_dir = FALSE, $level = 0)
-	{	
+	{
 		// Trim the trailing slash
 		$path = rtrim($path, DIRECTORY_SEPARATOR);
-			
+
 		if ( ! $current_dir = @opendir($path))
 		{
-			return FALSE;			
+			return FALSE;
 		}
-	
+
 		while(FALSE !== ($filename = @readdir($current_dir)))
 		{
 			if ($filename != "." and $filename != "..")
@@ -138,7 +138,7 @@
 					if (substr($filename, 0, 1) != '.')
 					{
 						delete_files($path.DIRECTORY_SEPARATOR.$filename, $del_dir, $level + 1);
-					}				
+					}
 				}
 				else
 				{
@@ -147,12 +147,12 @@
 			}
 		}
 		@closedir($current_dir);
-	
+
 		if ($del_dir == TRUE AND $level > 0)
 		{
 			return @rmdir($path);
 		}
-		
+
 		return TRUE;
 	}
 }
@@ -162,7 +162,7 @@
 /**
  * Get Filenames
  *
- * Reads the specified directory and builds an array containing the filenames.  
+ * Reads the specified directory and builds an array containing the filenames.
  * Any sub-folders contained within the specified path are read as well.
  *
  * @access	public
@@ -170,13 +170,13 @@
  * @param	bool	whether to include the path as part of the filename
  * @param	bool	internal variable to determine recursion status - do not use in calls
  * @return	array
- */	
+ */
 if ( ! function_exists('get_filenames'))
 {
 	function get_filenames($source_dir, $include_path = FALSE, $_recursion = FALSE)
 	{
 		static $_filedata = array();
-				
+
 		if ($fp = @opendir($source_dir))
 		{
 			// reset the array and make sure $source_dir has a trailing slash on the initial call
@@ -185,12 +185,12 @@
 				$_filedata = array();
 				$source_dir = rtrim(realpath($source_dir), DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR;
 			}
-			
+
 			while (FALSE !== ($file = readdir($fp)))
 			{
 				if (@is_dir($source_dir.$file) && strncmp($file, '.', 1) !== 0)
 				{
-					 get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE);
+					get_filenames($source_dir.$file.DIRECTORY_SEPARATOR, $include_path, TRUE);
 				}
 				elseif (strncmp($file, '.', 1) !== 0)
 				{
@@ -211,7 +211,7 @@
 /**
  * Get Directory File Information
  *
- * Reads the specified directory and builds an array containing the filenames,  
+ * Reads the specified directory and builds an array containing the filenames,
  * filesize, dates, and permissions
  *
  * Any sub-folders contained within the specified path are read as well.
@@ -221,7 +221,7 @@
  * @param	bool	Look only at the top level directory specified?
  * @param	bool	internal variable to determine recursion status - do not use in calls
  * @return	array
- */	
+ */
 if ( ! function_exists('get_dir_file_info'))
 {
 	function get_dir_file_info($source_dir, $top_level_only = TRUE, $_recursion = FALSE)
@@ -243,10 +243,10 @@
 			{
 				if (@is_dir($source_dir.$file) AND strncmp($file, '.', 1) !== 0 AND $top_level_only === FALSE)
 				{
- 					 get_dir_file_info($source_dir.$file.DIRECTORY_SEPARATOR, $top_level_only, TRUE);
- 				}
- 				elseif (strncmp($file, '.', 1) !== 0)
- 				{
+					get_dir_file_info($source_dir.$file.DIRECTORY_SEPARATOR, $top_level_only, TRUE);
+				}
+				elseif (strncmp($file, '.', 1) !== 0)
+				{
 					$_filedata[$file] = get_file_info($source_dir.$file);
 					$_filedata[$file]['relative_path'] = $relative_path;
 				}
@@ -332,7 +332,7 @@
 /**
  * Get Mime by Extension
  *
- * Translates a file extension into a mime type based on config/mimes.php. 
+ * Translates a file extension into a mime type based on config/mimes.php.
  * Returns FALSE if it can't determine the type, or open the mime config file
  *
  * Note: this is NOT an accurate way of determining file mime types, and is here strictly as a convenience
@@ -341,7 +341,7 @@
  * @access	public
  * @param	string	path to file
  * @return	mixed
- */	
+ */
 if ( ! function_exists('get_mime_by_extension'))
 {
 	function get_mime_by_extension($file)
@@ -388,11 +388,11 @@
  * @access	public
  * @param	int
  * @return	string
- */	
+ */
 if ( ! function_exists('symbolic_permissions'))
 {
 	function symbolic_permissions($perms)
-	{	
+	{
 		if (($perms & 0xC000) == 0xC000)
 		{
 			$symbolic = 's'; // Socket
@@ -441,7 +441,7 @@
 		$symbolic .= (($perms & 0x0002) ? 'w' : '-');
 		$symbolic .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-'));
 
-		return $symbolic;		
+		return $symbolic;
 	}
 }
 
@@ -456,7 +456,7 @@
  * @access	public
  * @param	int
  * @return	string
- */	
+ */
 if ( ! function_exists('octal_permissions'))
 {
 	function octal_permissions($perms)
diff --git a/system/helpers/form_helper.php b/system/helpers/form_helper.php
index 42355df..e722a07 100644
--- a/system/helpers/form_helper.php
+++ b/system/helpers/form_helper.php
@@ -37,7 +37,7 @@
  * @param	array	a key/value pair of attributes
  * @param	array	a key/value pair hidden data
  * @return	string
- */	
+ */
 if ( ! function_exists('form_open'))
 {
 	function form_open($action = '', $attributes = '', $hidden = array())
@@ -52,9 +52,9 @@
 		$action = ( strpos($action, '://') === FALSE) ? $CI->config->site_url($action) : $action;
 
 		$form = '<form action="'.$action.'"';
-	
+
 		$form .= _attributes_to_string($attributes, TRUE);
-	
+
 		$form .= '>';
 
 		// CSRF
@@ -143,7 +143,7 @@
 		{
 			foreach ($value as $k => $v)
 			{
-				$k = (is_int($k)) ? '' : $k; 
+				$k = (is_int($k)) ? '' : $k;
 				form_hidden($name.'['.$k.']', $v, TRUE);
 			}
 		}
@@ -250,10 +250,10 @@
 		}
 		else
 		{
-			$val = $data['value']; 
+			$val = $data['value'];
 			unset($data['value']); // textareas don't use the value attribute
 		}
-		
+
 		$name = (is_array($data)) ? $data['name'] : $data;
 		return "<textarea "._parse_form_attributes($data, $defaults).$extra.">".form_prep($val, $name)."</textarea>";
 	}
@@ -279,7 +279,7 @@
 		{
 			$extra .= ' multiple="multiple"';
 		}
-		
+
 		return form_dropdown($name, $options, $selected, $extra);
 	}
 }
@@ -414,7 +414,7 @@
 	function form_radio($data = '', $value = '', $checked = FALSE, $extra = '')
 	{
 		if ( ! is_array($data))
-		{	
+		{
 			$data = array('name' => $data);
 		}
 
@@ -435,7 +435,7 @@
  * @return	string
  */
 if ( ! function_exists('form_submit'))
-{	
+{
 	function form_submit($data = '', $value = '', $extra = '')
 	{
 		$defaults = array('type' => 'submit', 'name' => (( ! is_array($data)) ? $data : ''), 'value' => $value);
@@ -512,7 +512,7 @@
 
 		if ($id != '')
 		{
-			 $label .= " for=\"$id\"";
+			$label .= " for=\"$id\"";
 		}
 
 		if (is_array($attributes) AND count($attributes) > 0)
@@ -610,7 +610,7 @@
 	function form_prep($str = '', $field_name = '')
 	{
 		static $prepped_fields = array();
-		
+
 		// if the field name is an array we do this recursively
 		if (is_array($str))
 		{
@@ -635,7 +635,7 @@
 		{
 			return $str;
 		}
-		
+
 		$str = htmlspecialchars($str);
 
 		// In case htmlspecialchars misses these.
@@ -645,7 +645,7 @@
 		{
 			$prepped_fields[$field_name] = $field_name;
 		}
-		
+
 		return $str;
 	}
 }
@@ -757,7 +757,7 @@
 		$OBJ =& _get_validation_object();
 
 		if ($OBJ === FALSE)
-		{ 
+		{
 			if ( ! isset($_POST[$field]))
 			{
 				if (count($_POST) === 0 AND $default == TRUE)
@@ -768,7 +768,7 @@
 			}
 
 			$field = $_POST[$field];
-			
+
 			if (is_array($field))
 			{
 				if ( ! in_array($value, $field))
@@ -823,7 +823,7 @@
 			}
 
 			$field = $_POST[$field];
-			
+
 			if (is_array($field))
 			{
 				if ( ! in_array($value, $field))
@@ -933,7 +933,7 @@
 		}
 
 		$att = '';
-		
+
 		foreach ($default as $key => $val)
 		{
 			if ($key == 'value')
@@ -978,7 +978,7 @@
 
 		return ' '.$attributes;
 		}
-	
+
 		if (is_object($attributes) AND count($attributes) > 0)
 		{
 			$attributes = (array)$attributes;
diff --git a/system/helpers/html_helper.php b/system/helpers/html_helper.php
index cd7b4ce..1c8603d 100644
--- a/system/helpers/html_helper.php
+++ b/system/helpers/html_helper.php
@@ -388,9 +388,9 @@
 		$str = '';
 		foreach ($name as $meta)
 		{
-			$type 		= ( ! isset($meta['type']) OR $meta['type'] == 'name') ? 'name' : 'http-equiv';
-			$name 		= ( ! isset($meta['name'])) 	? '' 	: $meta['name'];
-			$content	= ( ! isset($meta['content']))	? '' 	: $meta['content'];
+			$type		= ( ! isset($meta['type']) OR $meta['type'] == 'name') ? 'name' : 'http-equiv';
+			$name		= ( ! isset($meta['name']))		? ''	: $meta['name'];
+			$content	= ( ! isset($meta['content']))	? ''	: $meta['content'];
 			$newline	= ( ! isset($meta['newline']))	? "\n"	: $meta['newline'];
 
 			$str .= '<meta '.$type.'="'.$name.'" content="'.$content.'" />'.$newline;
diff --git a/system/helpers/inflector_helper.php b/system/helpers/inflector_helper.php
index c4c530b..cd05c8d 100644
--- a/system/helpers/inflector_helper.php
+++ b/system/helpers/inflector_helper.php
@@ -36,14 +36,14 @@
  * @access	public
  * @param	string
  * @return	str
- */	
+ */
 if ( ! function_exists('singular'))
-{	
+{
 	function singular($str)
 	{
 		$str = strtolower(trim($str));
 		$end = substr($str, -3);
-	
+
 		if ($end == 'ies')
 		{
 			$str = substr($str, 0, strlen($str)-3).'y';
@@ -55,13 +55,13 @@
 		else
 		{
 			$end = substr($str, -1);
-		
+
 			if ($end == 's')
 			{
 				$str = substr($str, 0, strlen($str)-1);
 			}
 		}
-	
+
 		return $str;
 	}
 }
@@ -77,9 +77,9 @@
  * @param	string
  * @param	bool
  * @return	str
- */	
+ */
 if ( ! function_exists('plural'))
-{	
+{
 	function plural($str, $force = FALSE)
 	{
 		$str = strtolower(trim($str));
@@ -93,14 +93,14 @@
 		}
 		elseif ($end == 'h')
 		{
-		    if (substr($str, -2) == 'ch' || substr($str, -2) == 'sh')
-		    {
-		        $str .= 'es';
-		    }
-		    else
-		    {
-		        $str .= 's';
-		    }
+			if (substr($str, -2) == 'ch' || substr($str, -2) == 'sh')
+			{
+				$str .= 'es';
+			}
+			else
+			{
+				$str .= 's';
+			}
 		}
 		elseif ($end == 's')
 		{
@@ -128,11 +128,11 @@
  * @access	public
  * @param	string
  * @return	str
- */	
+ */
 if ( ! function_exists('camelize'))
-{	
+{
 	function camelize($str)
-	{		
+	{
 		$str = 'x'.strtolower(trim($str));
 		$str = ucwords(preg_replace('/[\s_]+/', ' ', $str));
 		return substr(str_replace(' ', '', $str), 1);
@@ -149,7 +149,7 @@
  * @access	public
  * @param	string
  * @return	str
- */	
+ */
 if ( ! function_exists('underscore'))
 {
 	function underscore($str)
@@ -168,15 +168,15 @@
  * @access	public
  * @param	string
  * @return	str
- */	
+ */
 if ( ! function_exists('humanize'))
-{	
+{
 	function humanize($str)
 	{
 		return ucwords(preg_replace('/[_]+/', ' ', strtolower(trim($str))));
 	}
 }
-	
+
 
 /* End of file inflector_helper.php */
 /* Location: ./system/helpers/inflector_helper.php */
\ No newline at end of file
diff --git a/system/helpers/language_helper.php b/system/helpers/language_helper.php
index 442619c..c6bbe86 100644
--- a/system/helpers/language_helper.php
+++ b/system/helpers/language_helper.php
@@ -36,7 +36,7 @@
  * @param	string	the language line
  * @param	string	the id of the form element
  * @return	string
- */	
+ */
 if ( ! function_exists('lang'))
 {
 	function lang($line, $id = '')
diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php
index f797921..e4535f6 100644
--- a/system/helpers/number_helper.php
+++ b/system/helpers/number_helper.php
@@ -40,23 +40,23 @@
 	{
 		$CI =& get_instance();
 		$CI->lang->load('number');
-	
-		if ($num >= 1000000000000) 
+
+		if ($num >= 1000000000000)
 		{
 			$num = round($num / 1099511627776, $precision);
 			$unit = $CI->lang->line('terabyte_abbr');
 		}
-		elseif ($num >= 1000000000) 
+		elseif ($num >= 1000000000)
 		{
 			$num = round($num / 1073741824, $precision);
 			$unit = $CI->lang->line('gigabyte_abbr');
 		}
-		elseif ($num >= 1000000) 
+		elseif ($num >= 1000000)
 		{
 			$num = round($num / 1048576, $precision);
 			$unit = $CI->lang->line('megabyte_abbr');
 		}
-		elseif ($num >= 1000) 
+		elseif ($num >= 1000)
 		{
 			$num = round($num / 1024, $precision);
 			$unit = $CI->lang->line('kilobyte_abbr');
@@ -68,7 +68,7 @@
 		}
 
 		return number_format($num, $precision).' '.$unit;
-	}	
+	}
 }
 
 
diff --git a/system/helpers/path_helper.php b/system/helpers/path_helper.php
index 030b6bf..556e8c9 100644
--- a/system/helpers/path_helper.php
+++ b/system/helpers/path_helper.php
@@ -34,7 +34,7 @@
  * @param	string
  * @param	bool	checks to see if the path exists
  * @return	string
- */	
+ */
 if ( ! function_exists('set_realpath'))
 {
 	function set_realpath($path, $check_existance = FALSE)
@@ -44,16 +44,16 @@
 		{
 			show_error('The path you submitted must be a local server path, not a URL');
 		}
-	
+
 		// Resolve the path
 		if (function_exists('realpath') AND @realpath($path) !== FALSE)
 		{
 			$path = realpath($path).'/';
 		}
-	
+
 		// Add a trailing slash
 		$path = preg_replace("#([^/])/*$#", "\\1/", $path);
-	
+
 		// Make sure the path exists
 		if ($check_existance == TRUE)
 		{
@@ -62,7 +62,7 @@
 				show_error('Not a valid path: '.$path);
 			}
 		}
-	
+
 		return $path;
 	}
 }
diff --git a/system/helpers/security_helper.php b/system/helpers/security_helper.php
index 63f0e9c..08dd48a 100644
--- a/system/helpers/security_helper.php
+++ b/system/helpers/security_helper.php
@@ -34,7 +34,7 @@
  * @param	string
  * @param	bool	whether or not the content is an image file
  * @return	string
- */	
+ */
 if ( ! function_exists('xss_clean'))
 {
 	function xss_clean($str, $is_image = FALSE)
@@ -52,7 +52,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('sanitize_filename'))
 {
 	function sanitize_filename($filename)
@@ -71,7 +71,7 @@
  * dohash() is now deprecated
  */
 if ( ! function_exists('dohash'))
-{	
+{
 	function dohash($str, $type = 'sha1')
 	{
 		return do_hash($str, $type);
@@ -86,9 +86,9 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('do_hash'))
-{	
+{
 	function do_hash($str, $type = 'sha1')
 	{
 		if ($type == 'sha1')
@@ -96,7 +96,7 @@
 			if ( ! function_exists('sha1'))
 			{
 				if ( ! function_exists('mhash'))
-				{	
+				{
 					require_once(BASEPATH.'libraries/Sha1'.EXT);
 					$SH = new CI_SHA;
 					return $SH->generate($str);
@@ -109,7 +109,7 @@
 			else
 			{
 				return sha1($str);
-			}	
+			}
 		}
 		else
 		{
@@ -117,7 +117,7 @@
 		}
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -126,18 +126,18 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('strip_image_tags'))
 {
 	function strip_image_tags($str)
 	{
 		$str = preg_replace("#<img\s+.*?src\s*=\s*[\"'](.+?)[\"'].*?\>#", "\\1", $str);
 		$str = preg_replace("#<img\s+.*?src\s*=\s*(.+?).*?\>#", "\\1", $str);
-			
+
 		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -146,7 +146,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('encode_php_tags'))
 {
 	function encode_php_tags($str)
diff --git a/system/helpers/smiley_helper.php b/system/helpers/smiley_helper.php
index b9eb0a2..3ebb612 100644
--- a/system/helpers/smiley_helper.php
+++ b/system/helpers/smiley_helper.php
@@ -45,7 +45,7 @@
 		static $do_setup = TRUE;
 
 		$r = '';
-	
+
 		if ($alias != '' && ! is_array($alias))
 		{
 			$alias = array($alias => $field_id);
@@ -54,9 +54,9 @@
 		if ($do_setup === TRUE)
 		{
 				$do_setup = FALSE;
-			
+
 				$m = array();
-			
+
 				if (is_array($alias))
 				{
 					foreach($alias as $name => $id)
@@ -64,22 +64,22 @@
 						$m[] = '"'.$name.'" : "'.$id.'"';
 					}
 				}
-			
+
 				$m = '{'.implode(',', $m).'}';
-			
+
 				$r .= <<<EOF
 				var smiley_map = {$m};
 
 				function insert_smiley(smiley, field_id) {
 					var el = document.getElementById(field_id), newStart;
-				
+
 					if ( ! el && smiley_map[field_id]) {
 						el = document.getElementById(smiley_map[field_id]);
-					
+
 						if ( ! el)
 							return false;
 					}
-				
+
 					el.focus();
 					smiley = " " + smiley;
 
@@ -110,7 +110,7 @@
 
 		if ($inline)
 		{
-			return '<script type="text/javascript" charset="utf-8">/*<![CDATA[ */'.$r.'// ]]></script>';			
+			return '<script type="text/javascript" charset="utf-8">/*<![CDATA[ */'.$r.'// ]]></script>';
 		}
 		else
 		{
@@ -124,8 +124,8 @@
 /**
  * Get Clickable Smileys
  *
- * Returns an array of image tag links that can be clicked to be inserted 
- * into a form field.  
+ * Returns an array of image tag links that can be clicked to be inserted
+ * into a form field.
  *
  * @access	public
  * @param	string	the URL to the folder containing the smiley images
@@ -136,12 +136,12 @@
 	function get_clickable_smileys($image_url, $alias = '', $smileys = NULL)
 	{
 		// For backward compatibility with js_insert_smiley
-		
+
 		if (is_array($alias))
 		{
 			$smileys = $alias;
 		}
-		
+
 		if ( ! is_array($smileys))
 		{
 			if (FALSE === ($smileys = _get_smiley_array()))
@@ -152,7 +152,7 @@
 
 		// Add a trailing slash to the file path if needed
 		$image_url = rtrim($image_url, '/').'/';
-	
+
 		$used = array();
 		foreach ($smileys as $key => $val)
 		{
@@ -164,12 +164,12 @@
 			{
 				continue;
 			}
-			
-			$link[] = "<a href=\"javascript:void(0);\" onclick=\"insert_smiley('".$key."', '".$alias."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";	
-	
+
+			$link[] = "<a href=\"javascript:void(0);\" onclick=\"insert_smiley('".$key."', '".$alias."')\"><img src=\"".$image_url.$smileys[$key][0]."\" width=\"".$smileys[$key][1]."\" height=\"".$smileys[$key][2]."\" alt=\"".$smileys[$key][3]."\" style=\"border:0;\" /></a>";
+
 			$used[$smileys[$key][0]] = TRUE;
 		}
-	
+
 		return $link;
 	}
 }
diff --git a/system/helpers/string_helper.php b/system/helpers/string_helper.php
index 60f6ed1..544b3b4 100644
--- a/system/helpers/string_helper.php
+++ b/system/helpers/string_helper.php
@@ -41,12 +41,12 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('trim_slashes'))
 {
 	function trim_slashes($str)
 	{
-	    return trim($str, '/');
+		return trim($str, '/');
 	}
 }
 
@@ -60,13 +60,13 @@
  * @access	public
  * @param	mixed	string or array
  * @return	mixed	string or array
- */	
+ */
 if ( ! function_exists('strip_slashes'))
 {
 	function strip_slashes($str)
 	{
 		if (is_array($str))
-		{	
+		{
 			foreach ($str as $key => $val)
 			{
 				$str[$key] = strip_slashes($val);
@@ -76,7 +76,7 @@
 		{
 			$str = stripslashes($str);
 		}
-	
+
 		return $str;
 	}
 }
@@ -91,7 +91,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('strip_quotes'))
 {
 	function strip_quotes($str)
@@ -110,11 +110,11 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('quotes_to_entities'))
 {
 	function quotes_to_entities($str)
-	{	
+	{
 		return str_replace(array("\'","\"","'",'"'), array("&#39;","&quot;","&#39;","&quot;"), $str);
 	}
 }
@@ -136,7 +136,7 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('reduce_double_slashes'))
 {
 	function reduce_double_slashes($str)
@@ -163,7 +163,7 @@
  * @param	string	the character you wish to reduce
  * @param	bool	TRUE/FALSE - whether to trim the character from the beginning/end
  * @return	string
- */	
+ */
 if ( ! function_exists('reduce_multiples'))
 {
 	function reduce_multiples($str, $character = ',', $trim = FALSE)
@@ -174,11 +174,11 @@
 		{
 			$str = trim($str, $character);
 		}
-    
+
 		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -187,23 +187,23 @@
  * Useful for generating passwords or hashes.
  *
  * @access	public
- * @param	string 	type of random string.  basic, alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1
+ * @param	string	type of random string.  basic, alpha, alunum, numeric, nozero, unique, md5, encrypt and sha1
  * @param	integer	number of characters
  * @return	string
- */	
+ */
 if ( ! function_exists('random_string'))
 {
 	function random_string($type = 'alnum', $len = 8)
-	{					
+	{
 		switch($type)
 		{
 			case 'basic'	: return mt_rand();
-			  break;
+				break;
 			case 'alnum'	:
 			case 'numeric'	:
 			case 'nozero'	:
 			case 'alpha'	:
-		
+
 					switch ($type)
 					{
 						case 'alpha'	:	$pool = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
@@ -222,20 +222,20 @@
 						$str .= substr($pool, mt_rand(0, strlen($pool) -1), 1);
 					}
 					return $str;
-			  break;
-			case 'unique'	: 
-			case 'md5' 		: 
-				
+				break;
+			case 'unique'	:
+			case 'md5'		:
+
 						return md5(uniqid(mt_rand()));
-			  break;
-			case 'encrypt'	: 
-			case 'sha1'	: 
-		
+				break;
+			case 'encrypt'	:
+			case 'sha1'	:
+
 						$CI =& get_instance();
 						$CI->load->helper('security');
-		
+
 						return do_hash(uniqid(mt_rand(), TRUE), 'sha1');
-			  break;
+				break;
 		}
 	}
 }
@@ -250,12 +250,12 @@
  * @access	public
  * @param	string (as many parameters as needed)
  * @return	string
- */	
+ */
 if ( ! function_exists('alternator'))
 {
 	function alternator()
 	{
-		static $i;	
+		static $i;
 
 		if (func_num_args() == 0)
 		{
@@ -276,13 +276,13 @@
  * @param	string
  * @param	integer	number of repeats
  * @return	string
- */	
+ */
 if ( ! function_exists('repeater'))
 {
 	function repeater($data, $num = 1)
 	{
 		return (($num > 0) ? str_repeat($data, $num) : '');
-	} 
+	}
 }
 
 
diff --git a/system/helpers/text_helper.php b/system/helpers/text_helper.php
index b85e2aa..8bc1cd5 100644
--- a/system/helpers/text_helper.php
+++ b/system/helpers/text_helper.php
@@ -37,7 +37,7 @@
  * @param	integer
  * @param	string	the end character. Usually an ellipsis
  * @return	string
- */	
+ */
 if ( ! function_exists('word_limiter'))
 {
 	function word_limiter($str, $limit = 100, $end_char = '&#8230;')
@@ -46,18 +46,18 @@
 		{
 			return $str;
 		}
-	
+
 		preg_match('/^\s*+(?:\S++\s*+){1,'.(int) $limit.'}/', $str, $matches);
-			
+
 		if (strlen($str) == strlen($matches[0]))
 		{
 			$end_char = '';
 		}
-		
+
 		return rtrim($matches[0]).$end_char;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -71,7 +71,7 @@
  * @param	integer
  * @param	string	the end character. Usually an ellipsis
  * @return	string
- */	
+ */
 if ( ! function_exists('character_limiter'))
 {
 	function character_limiter($str, $n = 500, $end_char = '&#8230;')
@@ -80,28 +80,28 @@
 		{
 			return $str;
 		}
-		
+
 		$str = preg_replace("/\s+/", ' ', str_replace(array("\r\n", "\r", "\n"), ' ', $str));
 
 		if (strlen($str) <= $n)
 		{
 			return $str;
 		}
-									
+
 		$out = "";
 		foreach (explode(' ', trim($str)) as $val)
 		{
 			$out .= $val.' ';
-			
+
 			if (strlen($out) >= $n)
 			{
 				$out = trim($out);
 				return (strlen($out) == strlen($str)) ? $out : $out.$end_char;
-			}		
+			}
 		}
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -112,21 +112,21 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('ascii_to_entities'))
 {
 	function ascii_to_entities($str)
 	{
-	   $count	= 1;
-	   $out	= '';
-	   $temp	= array();
-	
-	   for ($i = 0, $s = strlen($str); $i < $s; $i++)
-	   {
-		   $ordinal = ord($str[$i]);
-	
-		   if ($ordinal < 128)
-		   {
+		$count	= 1;
+		$out	= '';
+		$temp	= array();
+
+		for ($i = 0, $s = strlen($str); $i < $s; $i++)
+		{
+			$ordinal = ord($str[$i]);
+
+			if ($ordinal < 128)
+			{
 				/*
 					If the $temp array has a value but we have moved on, then it seems only
 					fair that we output that entity and restart $temp before continuing. -Paul
@@ -136,33 +136,33 @@
 					$out  .= '&#'.array_shift($temp).';';
 					$count = 1;
 				}
-			
+
 				$out .= $str[$i];
-		   }
-		   else
-		   {
-			   if (count($temp) == 0)
-			   {
-				   $count = ($ordinal < 224) ? 2 : 3;
-			   }
-		
-			   $temp[] = $ordinal;
-		
-			   if (count($temp) == $count)
-			   {
-				   $number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
+			}
+			else
+			{
+				if (count($temp) == 0)
+				{
+					$count = ($ordinal < 224) ? 2 : 3;
+				}
 
-				   $out .= '&#'.$number.';';
-				   $count = 1;
-				   $temp = array();
-			   }
-		   }
-	   }
+				$temp[] = $ordinal;
 
-	   return $out;
+				if (count($temp) == $count)
+				{
+					$number = ($count == 3) ? (($temp['0'] % 16) * 4096) + (($temp['1'] % 64) * 64) + ($temp['2'] % 64) : (($temp['0'] % 32) * 64) + ($temp['1'] % 64);
+
+					$out .= '&#'.$number.';';
+					$count = 1;
+					$temp = array();
+				}
+			}
+		}
+
+		return $out;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -174,51 +174,51 @@
  * @param	string
  * @param	bool
  * @return	string
- */	
+ */
 if ( ! function_exists('entities_to_ascii'))
 {
 	function entities_to_ascii($str, $all = TRUE)
 	{
-	   if (preg_match_all('/\&#(\d+)\;/', $str, $matches))
-	   {
-		   for ($i = 0, $s = count($matches['0']); $i < $s; $i++)
-		   {				
-			   $digits = $matches['1'][$i];
+		if (preg_match_all('/\&#(\d+)\;/', $str, $matches))
+		{
+			for ($i = 0, $s = count($matches['0']); $i < $s; $i++)
+			{
+				$digits = $matches['1'][$i];
 
-			   $out = '';
+				$out = '';
 
-			   if ($digits < 128)
-			   {
-				   $out .= chr($digits);
-		
-			   }
-			   elseif ($digits < 2048)
-			   {
-				   $out .= chr(192 + (($digits - ($digits % 64)) / 64));
-				   $out .= chr(128 + ($digits % 64));
-			   }
-			   else
-			   {
-				   $out .= chr(224 + (($digits - ($digits % 4096)) / 4096));
-				   $out .= chr(128 + ((($digits % 4096) - ($digits % 64)) / 64));
-				   $out .= chr(128 + ($digits % 64));
-			   }
+				if ($digits < 128)
+				{
+					$out .= chr($digits);
 
-			   $str = str_replace($matches['0'][$i], $out, $str);				
-		   }
-	   }
+				}
+				elseif ($digits < 2048)
+				{
+					$out .= chr(192 + (($digits - ($digits % 64)) / 64));
+					$out .= chr(128 + ($digits % 64));
+				}
+				else
+				{
+					$out .= chr(224 + (($digits - ($digits % 4096)) / 4096));
+					$out .= chr(128 + ((($digits % 4096) - ($digits % 64)) / 64));
+					$out .= chr(128 + ($digits % 64));
+				}
 
-	   if ($all)
-	   {
-		   $str = str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),
-							  array("&","<",">","\"", "'", "-"),
-							  $str);
-	   }
+				$str = str_replace($matches['0'][$i], $out, $str);
+			}
+		}
 
-	   return $str;
+		if ($all)
+		{
+			$str = str_replace(array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),
+								array("&","<",">","\"", "'", "-"),
+								$str);
+		}
+
+		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -233,7 +233,7 @@
  * @param	string	the array of censoered words
  * @param	string	the optional replacement value
  * @return	string
- */	
+ */
 if ( ! function_exists('word_censor'))
 {
 	function word_censor($str, $censored, $replacement = '')
@@ -242,8 +242,8 @@
 		{
 			return $str;
 		}
-        
-        $str = ' '.$str.' ';
+
+		$str = ' '.$str.' ';
 
 		// \w, \b and a few others do not match on a unicode character
 		// set for performance reasons. As a result words like über
@@ -263,10 +263,10 @@
 			}
 		}
 
-        return trim($str);
+		return trim($str);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -277,26 +277,26 @@
  * @access	public
  * @param	string	the text string
  * @return	string
- */	
+ */
 if ( ! function_exists('highlight_code'))
 {
 	function highlight_code($str)
-	{		
+	{
 		// The highlight string function encodes and highlights
 		// brackets so we need them to start raw
 		$str = str_replace(array('&lt;', '&gt;'), array('<', '>'), $str);
-	
+
 		// Replace any existing PHP tags to temporary markers so they don't accidentally
 		// break the string out of PHP, and thus, thwart the highlighting.
-	
-		$str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'), 
+
+		$str = str_replace(array('<?', '?>', '<%', '%>', '\\', '</script>'),
 							array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'), $str);
 
 		// The highlight_string function requires that the text be surrounded
 		// by PHP tags, which we will remove later
 		$str = '<?php '.$str.' ?>'; // <?
 
-		// All the magic happens here, baby!	
+		// All the magic happens here, baby!
 		$str = highlight_string($str, TRUE);
 
 		// Prior to PHP 5, the highligh function used icky <font> tags
@@ -307,20 +307,20 @@
 			$str = str_replace(array('<font ', '</font>'), array('<span ', '</span>'), $str);
 			$str = preg_replace('#color="(.*?)"#', 'style="color: \\1"', $str);
 		}
-		
+
 		// Remove our artificially added PHP, and the syntax highlighting that came with it
 		$str = preg_replace('/<span style="color: #([A-Z0-9]+)">&lt;\?php(&nbsp;| )/i', '<span style="color: #$1">', $str);
 		$str = preg_replace('/(<span style="color: #[A-Z0-9]+">.*?)\?&gt;<\/span>\n<\/span>\n<\/code>/is', "$1</span>\n</span>\n</code>", $str);
 		$str = preg_replace('/<span style="color: #[A-Z0-9]+"\><\/span>/i', '', $str);
-			
+
 		// Replace our markers back to PHP tags.
 		$str = str_replace(array('phptagopen', 'phptagclose', 'asptagopen', 'asptagclose', 'backslashtmp', 'scriptclose'),
 							array('&lt;?', '?&gt;', '&lt;%', '%&gt;', '\\', '&lt;/script&gt;'), $str);
-										
+
 		return $str;
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -334,7 +334,7 @@
  * @param	string	the openging tag to precede the phrase with
  * @param	string	the closing tag to end the phrase with
  * @return	string
- */	
+ */
 if ( ! function_exists('highlight_phrase'))
 {
 	function highlight_phrase($str, $phrase, $tag_open = '<strong>', $tag_close = '</strong>')
@@ -343,7 +343,7 @@
 		{
 			return '';
 		}
-	
+
 		if ($phrase != '')
 		{
 			return preg_replace('/('.preg_quote($phrase, '/').')/i', $tag_open."\\1".$tag_close, $str);
@@ -361,7 +361,7 @@
  * @access	public
  * @param	string	the text string
  * @return	string
- */	
+ */
 if ( ! function_exists('convert_accented_characters'))
 {
 	function convert_accented_characters($match)
@@ -370,16 +370,16 @@
 		{
 			return $match;
 		}
-	
+
 		include APPPATH.'config/foreign_chars'.EXT;
-	
+
 		if ( ! isset($foreign_characters))
 		{
 			return $match;
 		}
-								
+
 		$ord = ord($match['1']);
-		
+
 		if (isset($foreign_characters[$ord]))
 		{
 			return $foreign_characters[$ord];
@@ -390,7 +390,7 @@
 		}
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -404,7 +404,7 @@
  * @param	string	the text string
  * @param	integer	the number of characters to wrap at
  * @return	string
- */	
+ */
 if ( ! function_exists('word_wrap'))
 {
 	function word_wrap($str, $charlim = '76')
@@ -412,47 +412,47 @@
 		// Se the character limit
 		if ( ! is_numeric($charlim))
 			$charlim = 76;
-	
+
 		// Reduce multiple spaces
 		$str = preg_replace("| +|", " ", $str);
-	
+
 		// Standardize newlines
 		if (strpos($str, "\r") !== FALSE)
 		{
-			$str = str_replace(array("\r\n", "\r"), "\n", $str);			
+			$str = str_replace(array("\r\n", "\r"), "\n", $str);
 		}
-	
-		// If the current word is surrounded by {unwrap} tags we'll 
+
+		// If the current word is surrounded by {unwrap} tags we'll
 		// strip the entire chunk and replace it with a marker.
 		$unwrap = array();
 		if (preg_match_all("|(\{unwrap\}.+?\{/unwrap\})|s", $str, $matches))
 		{
 			for ($i = 0; $i < count($matches['0']); $i++)
 			{
-				$unwrap[] = $matches['1'][$i];				
+				$unwrap[] = $matches['1'][$i];
 				$str = str_replace($matches['1'][$i], "{{unwrapped".$i."}}", $str);
 			}
 		}
-	
-		// Use PHP's native function to do the initial wordwrap.  
-		// We set the cut flag to FALSE so that any individual words that are 
+
+		// Use PHP's native function to do the initial wordwrap.
+		// We set the cut flag to FALSE so that any individual words that are
 		// too long get left alone.  In the next step we'll deal with them.
 		$str = wordwrap($str, $charlim, "\n", FALSE);
-	
+
 		// Split the string into individual lines of text and cycle through them
 		$output = "";
-		foreach (explode("\n", $str) as $line) 
+		foreach (explode("\n", $str) as $line)
 		{
 			// Is the line within the allowed character count?
 			// If so we'll join it to the output and continue
 			if (strlen($line) <= $charlim)
 			{
-				$output .= $line."\n";			
+				$output .= $line."\n";
 				continue;
 			}
-			
+
 			$temp = '';
-			while((strlen($line)) > $charlim) 
+			while((strlen($line)) > $charlim)
 			{
 				// If the over-length word is a URL we won't wrap it
 				if (preg_match("!\[url.+\]|://|wwww.!", $line))
@@ -464,12 +464,12 @@
 				$temp .= substr($line, 0, $charlim-1);
 				$line = substr($line, $charlim-1);
 			}
-		
-			// If $temp contains data it means we had to split up an over-length 
+
+			// If $temp contains data it means we had to split up an over-length
 			// word into smaller chunks so we'll add it back to our current line
 			if ($temp != '')
 			{
-				$output .= $temp."\n".$line; 
+				$output .= $temp."\n".$line;
 			}
 			else
 			{
@@ -481,7 +481,7 @@
 
 		// Put our markers back
 		if (count($unwrap) > 0)
-		{	
+		{
 			foreach ($unwrap as $key => $val)
 			{
 				$output = str_replace("{{unwrapped".$key."}}", $val, $output);
@@ -491,10 +491,10 @@
 		// Remove the unwrap tags
 		$output = str_replace(array('{unwrap}', '{/unwrap}'), '', $output);
 
-		return $output;	
+		return $output;
 	}
 }
- 
+
 // ------------------------------------------------------------------------
 
 /**
@@ -502,10 +502,10 @@
  *
  * This function will strip tags from a string, split it at its max_length and ellipsize
  *
- * @param 	string		string to ellipsize
+ * @param	string		string to ellipsize
  * @param	integer		max length of string
  * @param	mixed		int (1|0) or float, .5, .2, etc for position to split
- * @param 	string		ellipsis ; Default '...'
+ * @param	string		ellipsis ; Default '...'
  * @return	string		ellipsized string
  */
 if ( ! function_exists('ellipsize'))
@@ -534,7 +534,7 @@
 			$end = substr($str, -($max_length - strlen($beg)));
 		}
 
-		return $beg.$ellipsis.$end;	
+		return $beg.$ellipsis.$end;
 	}
 }
 
diff --git a/system/helpers/typography_helper.php b/system/helpers/typography_helper.php
index e45480e..1a71d18 100644
--- a/system/helpers/typography_helper.php
+++ b/system/helpers/typography_helper.php
@@ -33,19 +33,19 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('nl2br_except_pre'))
 {
 	function nl2br_except_pre($str)
 	{
 		$CI =& get_instance();
-	
+
 		$CI->load->library('typography');
-		
+
 		return $CI->typography->nl2br_except_pre($str);
 	}
 }
-	
+
 // ------------------------------------------------------------------------
 
 /**
@@ -62,7 +62,7 @@
 {
 	function auto_typography($str, $strip_js_event_handlers = TRUE, $reduce_linebreaks = FALSE)
 	{
-		$CI =& get_instance();	
+		$CI =& get_instance();
 		$CI->load->library('typography');
 		return $CI->typography->auto_typography($str, $strip_js_event_handlers, $reduce_linebreaks);
 	}
@@ -84,7 +84,7 @@
 {
 	function entity_decode($str, $charset='UTF-8')
 	{
-		$CI =& get_instance();	
+		$CI =& get_instance();
 		$CI->load->library('security');
 		return $CI->security->entity_decode($str, $charset);
 	}
diff --git a/system/helpers/url_helper.php b/system/helpers/url_helper.php
index dad7611..e59efff 100644
--- a/system/helpers/url_helper.php
+++ b/system/helpers/url_helper.php
@@ -70,7 +70,7 @@
 /**
  * Current URL
  *
- * Returns the full URL (including segments) of the page where this 
+ * Returns the full URL (including segments) of the page where this
  * function is placed
  *
  * @access	public
@@ -224,7 +224,7 @@
  * @access	public
  * @param	string	the email address
  * @param	string	the link title
- * @param	mixed 	any attributes
+ * @param	mixed	any attributes
  * @return	string
  */
 if ( ! function_exists('mailto'))
@@ -254,7 +254,7 @@
  * @access	public
  * @param	string	the email address
  * @param	string	the link title
- * @param	mixed 	any attributes
+ * @param	mixed	any attributes
  * @return	string
  */
 if ( ! function_exists('safe_mailto'))
@@ -320,7 +320,7 @@
 				{
 					$count = ($ordinal < 224) ? 2 : 3;
 				}
-	
+
 				$temp[] = $ordinal;
 				if (count($temp) == $count)
 				{
@@ -369,7 +369,7 @@
  * @access	public
  * @param	string	the string
  * @param	string	the type: email, url, or both
- * @param	bool 	whether to create pop-up links
+ * @param	bool	whether to create pop-up links
  * @return	string
  */
 if ( ! function_exists('auto_link'))
@@ -381,7 +381,7 @@
 			if (preg_match_all("#(^|\s|\()((http(s?)://)|(www\.))(\w+[^\s\)\<]+)#i", $str, $matches))
 			{
 				$pop = ($popup == TRUE) ? " target=\"_blank\" " : "";
-	
+
 				for ($i = 0; $i < count($matches['0']); $i++)
 				{
 					$period = '';
@@ -390,7 +390,7 @@
 						$period = '.';
 						$matches['6'][$i] = substr($matches['6'][$i], 0, -1);
 					}
-		
+
 					$str = str_replace($matches['0'][$i],
 										$matches['1'][$i].'<a href="http'.
 										$matches['4'][$i].'://'.
@@ -416,7 +416,7 @@
 						$period = '.';
 						$matches['3'][$i] = substr($matches['3'][$i], 0, -1);
 					}
-		
+
 					$str = str_replace($matches['0'][$i], safe_mailto($matches['1'][$i].'@'.$matches['2'][$i].'.'.$matches['3'][$i]).$period, $str);
 				}
 			}
@@ -447,7 +447,7 @@
 		}
 
 		$url = parse_url($str);
-		
+
 		if ( ! $url OR ! isset($url['scheme']))
 		{
 			$str = 'http://'.$str;
@@ -495,7 +495,7 @@
 						$replace.'$'			=> $replace,
 						'^'.$replace			=> $replace,
 						'\.+$'					=> ''
-					  );
+					);
 
 		$str = strip_tags($str);
 
@@ -508,7 +508,7 @@
 		{
 			$str = strtolower($str);
 		}
-		
+
 		return trim(stripslashes($str));
 	}
 }
@@ -535,7 +535,7 @@
 		{
 			$uri = site_url($uri);
 		}
-		
+
 		switch($method)
 		{
 			case 'refresh'	: header("Refresh:0;url=".$uri);
diff --git a/system/helpers/xml_helper.php b/system/helpers/xml_helper.php
index 56f5e01..dcfbbdf 100644
--- a/system/helpers/xml_helper.php
+++ b/system/helpers/xml_helper.php
@@ -33,36 +33,36 @@
  * @access	public
  * @param	string
  * @return	string
- */	
+ */
 if ( ! function_exists('xml_convert'))
 {
 	function xml_convert($str, $protect_all = FALSE)
 	{
 		$temp = '__TEMP_AMPERSANDS__';
 
-		// Replace entities to temporary markers so that 
-		// ampersands won't get messed up	
+		// Replace entities to temporary markers so that
+		// ampersands won't get messed up
 		$str = preg_replace("/&#(\d+);/", "$temp\\1;", $str);
-	
+
 		if ($protect_all === TRUE)
 		{
 			$str = preg_replace("/&(\w+);/",  "$temp\\1;", $str);
 		}
-	
+
 		$str = str_replace(array("&","<",">","\"", "'", "-"),
 							array("&amp;", "&lt;", "&gt;", "&quot;", "&apos;", "&#45;"),
 							$str);
 
-		// Decode the temp markers back to entities		
+		// Decode the temp markers back to entities
 		$str = preg_replace("/$temp(\d+);/","&#\\1;",$str);
-	
+
 		if ($protect_all === TRUE)
 		{
 			$str = preg_replace("/$temp(\w+);/","&\\1;", $str);
 		}
-	
+
 		return $str;
-	}	
+	}
 }
 
 // ------------------------------------------------------------------------
